<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增在职人员分析')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-select-css"/>
</head>
<style>
    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }

</style>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="dv">
    <form class="form-horizontal m" id="proProgress-add" AUTOCOMPLETE="OFF">
        <input th:value="${data.id}" id="id" name="id" class="form-control" type="hidden"/>
        <h4 class="form-header h4">基本信息</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">区域：</label>
                    <div class="col-sm-8">
                        <select name="compId" id="compId" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option th:each="pro:${userComp}"
                                    th:selected="${data.compId==pro.compId}"
                                    th:value="${pro.compId}"
                                    th:text="${pro.compName}"></option>
                        </select>
                    </div>

                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">项目名称：</label>
                    <div class="col-sm-8">
                        <input id="proName" name="proName" th:value="${data.proName}" class="form-control" type="text"
                               placeholder="请输入项名名称" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">年份：</label>
                    <div class="col-sm-8">
                        <select name="years" id="years" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option th:selected="${data.years==2020}" value="2020">2020</option>
                            <option th:selected="${data.years==2021}" value="2021">2021</option>
                            <option th:selected="${data.years==2022}" value="2022">2022</option>
                            <option th:selected="${data.years==2023}" value="2023">2023</option>
                            <option th:selected="${data.years==2024}" value="2024">2024</option>
                            <option th:selected="${data.years==2025}" value="2025">2025</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">月份：</label>
                    <div class="col-sm-8">
                        <select name="months" id="months" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option th:selected="${data.months==1}" value="1">一月</option>
                            <option th:selected="${data.months==2}" value="2">二月</option>
                            <option th:selected="${data.months==3}" value="3">三月</option>
                            <option th:selected="${data.months==4}" value="4">四月</option>
                            <option th:selected="${data.months==5}" value="5">五月</option>
                            <option th:selected="${data.months==6}" value="6">六月</option>
                            <option th:selected="${data.months==7}" value="7">七月</option>
                            <option th:selected="${data.months==8}" value="8">八月</option>
                            <option th:selected="${data.months==9}" value="9">九月</option>
                            <option th:selected="${data.months==10}" value="10">十月</option>
                            <option th:selected="${data.months==11}" value="11">十一月</option>
                            <option th:selected="${data.months==12}" value="12">十二月</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <label class="col-sm-2 control-label">项目业态：</label>
                <div class="col-sm-10">
                    <textarea id="proFormat" name="proFormat" th:text="${data.proFormat}" class="form-control"
                              type="text"
                              placeholder="请输入项目业态" required></textarea>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <label class="col-sm-2 control-label">当前进度：</label>
                <div class="col-sm-10">
                    <textarea id="currentProgress" th:text="${data.currentProgress}" name="currentProgress"
                              class="form-control" type="text"
                              placeholder="请输入当前进度" required></textarea>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">建筑面积（㎡）</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">地上：</label>
                    <div class="col-sm-8">
                        <input id="groundArea" th:value="${data.groundArea}" name="groundArea" class="form-control"
                               type="number"
                               placeholder="请输入地上面积" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">地下：</label>
                    <div class="col-sm-8">
                        <input id="undergroundArea" th:value="${data.undergroundArea}" name="undergroundArea"
                               class="form-control" type="number"
                               placeholder="请输入地下面积" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">合计：</label>
                    <div class="col-sm-8">
                        <input id="totalArea" name="totalArea" th:value="${data.totalArea}" class="form-control"
                               type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">标准</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">项目经理：</label>
                    <div class="col-sm-8">
                        <input id="xmjl_num_standard" name="xmjl_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">技术负责人：</label>
                    <div class="col-sm-8">
                        <input id="jsfzr_num_standard" name="jsfzr_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">生产经理：</label>
                    <div class="col-sm-8">
                        <input id="scjl_num_standard" name="scjl_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全主管：</label>
                    <div class="col-sm-8">
                        <input id="aqzg_numstandard" name="aqzg_numstandard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全员：</label>
                    <div class="col-sm-8">
                        <input id="aqy_num_standard" name="aqy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质量主管：</label>
                    <div class="col-sm-8">
                        <input id="zlzg_num_standard" name="zlzg_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质检员：</label>
                    <div class="col-sm-8">
                        <input id="zjy_num_standard" name="zjy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">一级施工员：</label>
                    <div class="col-sm-8">
                        <input id="yjsgy_num_standard" name="yjsgy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">二级施工员：</label>
                    <div class="col-sm-8">
                        <input id="erjsgy_num_standard" name="erjsgy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">三级施工员：</label>
                    <div class="col-sm-8">
                        <input id="sjsgy_num_standard" name="sjsgy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">资料员：</label>
                    <div class="col-sm-8">
                        <input id="zly_num_standard" name="zly_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">电工：</label>
                    <div class="col-sm-8">
                        <input id="dg_num_standard" name="dg_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料主管：</label>
                    <div class="col-sm-8">
                        <input id="clzg_num_standard" name="clzg_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料员：</label>
                    <div class="col-sm-8">
                        <input id="cly_num_standard" name="cly_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">劳资员：</label>
                    <div class="col-sm-8">
                        <input id="lzy_num_standard" name="lzy_num_standard" class="form-control" type="number"
                               required disabled>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">标准合计：</label>
                    <div class="col-sm-8">
                        <input id="standard_sum" name="standard_sum" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">实际在职</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">项目经理：</label>
                    <div class="col-sm-8">
                        <input id="xmjlNum" name="xmjlNum" th:value="${data.xmjlNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">技术负责人：</label>
                    <div class="col-sm-8">
                        <input id="jsfzrNum" name="jsfzrNum" th:value="${data.jsfzrNum}" class="form-control"
                               type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">生产经理：</label>
                    <div class="col-sm-8">
                        <input id="scjlNum" name="scjlNum" th:value="${data.scjlNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全主管：</label>
                    <div class="col-sm-8">
                        <input id="aqzgNum" name="aqzgNum" th:value="${data.aqzgNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全员：</label>
                    <div class="col-sm-8">
                        <input id="aqyNum" name="aqyNum" th:value="${data.aqyNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质量主管：</label>
                    <div class="col-sm-8">
                        <input id="zlzgNum" name="zlzgNum" th:value="${data.zlzgNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质检员：</label>
                    <div class="col-sm-8">
                        <input id="zjyNum" name="zjyNum" th:value="${data.zjyNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">一级施工员：</label>
                    <div class="col-sm-8">
                        <input id="yjsgyNum" name="yjsgyNum" th:value="${data.yjsgyNum}" class="form-control"
                               type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>

        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">二级施工员：</label>
                    <div class="col-sm-8">
                        <input id="erjsgyNum" name="erjsgyNum" th:value="${data.erjsgyNum}" class="form-control"
                               type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">三级施工员：</label>
                    <div class="col-sm-8">
                        <input id="sjsgyNum" name="sjsgyNum" th:value="${data.sjsgyNum}" class="form-control"
                               type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">资料员：</label>
                    <div class="col-sm-8">
                        <input id="zlyNum" name="zlyNum" th:value="${data.zlyNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">电工：</label>
                    <div class="col-sm-8">
                        <input id="dgNum" name="dgNum" th:value="${data.dgNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料主管：</label>
                    <div class="col-sm-8">
                        <input id="clzgNum" name="clzgNum" th:value="${data.clzgNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料员：</label>
                    <div class="col-sm-8">
                        <input id="clyNum" name="clyNum" th:value="${data.clyNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">劳资员：</label>
                    <div class="col-sm-8">
                        <input id="lzyNum" name="lzyNum" th:value="${data.lzyNum}" class="form-control" type="number"
                               placeholder="请输入实际在职人数" required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">实际在职合计：</label>
                    <div class="col-sm-8">
                        <input id="totalNum" name="totalNum" th:value="${data.totalNum}" class="form-control"
                               type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <h4 class="form-header h4">差异</h4>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">项目经理：</label>
                    <div class="col-sm-8">
                        <input id="xmjl_num_difference" name="xmjl_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">技术负责人：</label>
                    <div class="col-sm-8">
                        <input id="jsfzr_num_difference" name="jsfzr_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">生产经理：</label>
                    <div class="col-sm-8">
                        <input id="scjl_num_difference" name="scjl_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全主管：</label>
                    <div class="col-sm-8">
                        <input id="aqzg_num_difference" name="aqzg_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">安全员：</label>
                    <div class="col-sm-8">
                        <input id="aqy_num_difference" name="aqy_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质量主管：</label>
                    <div class="col-sm-8">
                        <input id="zlzg_num_difference" name="zlzg_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">质检员：</label>
                    <div class="col-sm-8">
                        <input id="zjy_num_difference" name="zjy_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">一级施工员：</label>
                    <div class="col-sm-8">
                        <input id="yjsgy_num_difference" name="yjsgy_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>

        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">二级施工员：</label>
                    <div class="col-sm-8">
                        <input id="erjsgy_num_difference" name="erjsgy_num_difference" class="form-control"
                               type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">三级施工员：</label>
                    <div class="col-sm-8">
                        <input id="sjsgy_num_difference" name="sjsgy_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">资料员：</label>
                    <div class="col-sm-8">
                        <input id="zly_num_difference" name="zly_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">电工：</label>
                    <div class="col-sm-8">
                        <input id="dg_num_difference" name="dg_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料主管：</label>
                    <div class="col-sm-8">
                        <input id="clzg_num_difference" name="clzg_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">材料员：</label>
                    <div class="col-sm-8">
                        <input id="cly_num_difference" name="cly_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">劳资员：</label>
                    <div class="col-sm-8">
                        <input id="lzy_num_difference" name="lzy_num_difference" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">差异合计：</label>
                    <div class="col-sm-8">
                        <input id="difference_sum" name="lzy_num_difference_sum" class="form-control" type="number"
                               disabled required>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <label class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-10">
                    <textarea id="remarks" name="remarks" th:value="${data.remarks}" class="form-control" type="text"
                              placeholder="请输入备注"></textarea>
                </div>
            </div>
        </div>


    </form>

</div>

</div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: select2-js"/>
<script type="text/javascript">
    var prefix = ctx + 'proProgress';
    var total_area_sum;
    var sum = 0;
    var standard_sum;
    var difference_sum;
    var actual_sum;
    $(function () {
        data();
        chang_data();
        $("#groundArea,#undergroundArea").change(function () {
            data();
        })
        $("input").change(function () {
            chang_data();
        })
    })

    function data() {
        total_area_sum = Number($("#groundArea").val()) + Number($("#undergroundArea").val());
        $("#totalArea").val(total_area_sum.toFixed(2));
        $.ajax({
            url: prefix + '/findPersonNum',
            data: {
                total_area: total_area_sum
            },
            async: false,
            success: function (data) {
                sum = data;
                $("#xmjl_num_standard").val(data.data.xmjl);
                $("#jsfzr_num_standard").val(data.data.jsfzr);
                $("#scjl_num_standard").val(data.data.scjl);
                $("#aqzg_numstandard").val(data.data.aqzg);
                $("#aqy_num_standard").val(data.data.aqy);
                $("#zlzg_num_standard").val(data.data.zlzg);
                $("#zjy_num_standard").val(data.data.zjy);
                $("#yjsgy_num_standard").val(data.data.yjsgy);
                $("#erjsgy_num_standard").val(data.data.erjsgy);
                $("#sjsgy_num_standard").val(data.data.sjsgy);
                $("#zly_num_standard").val(data.data.zly);
                $("#dg_num_standard").val(data.data.dg);
                $("#clzg_num_standard").val(data.data.clzg);
                $("#cly_num_standard").val(data.data.cly);
                $("#lzy_num_standard").val(data.data.lzy);
                delete data.data.square;
                standard_sum = 0;
                for (var i in data.data) {
                    standard_sum += data.data[i];
                }
                $("#standard_sum").val(standard_sum);
            }
        })
    }

    function chang_data() {
        if (sum != 0) {
            $("#xmjl_num_difference").val(Number($("#xmjlNum").val()) - sum.data.xmjl);
            $("#jsfzr_num_difference").val(Number($("#jsfzrNum").val()) - sum.data.jsfzr);
            $("#scjl_num_difference").val(Number($("#scjlNum").val()) - sum.data.scjl);
            $("#aqzg_num_difference").val(Number($("#aqzgNum").val()) - sum.data.aqzg);
            $("#aqy_num_difference").val(Number($("#aqyNum").val()) - sum.data.aqy);
            $("#zlzg_num_difference").val(Number($("#zlzgNum").val()) - sum.data.zlzg);
            $("#zjy_num_difference").val(Number($("#zjyNum").val()) - sum.data.zjy);
            $("#yjsgy_num_difference").val(Number($("#yjsgyNum").val()) - sum.data.yjsgy);
            $("#erjsgy_num_difference").val(Number($("#erjsgyNum").val()) - sum.data.erjsgy);
            $("#sjsgy_num_difference").val(Number($("#sjsgyNum").val()) - sum.data.sjsgy);
            $("#zly_num_difference").val(Number($("#zlyNum").val()) - sum.data.zly);
            $("#dg_num_difference").val(Number($("#dgNum").val()) - sum.data.dg);
            $("#clzg_num_difference").val(Number($("#clzgNum").val()) - sum.data.clzg);
            $("#cly_num_difference").val(Number($("#clyNum").val()) - sum.data.cly);
            $("#lzy_num_difference").val(Number($("#lzyNum").val()) - sum.data.lzy);
        }
        difference_sum = Number($("#xmjl_num_difference").val()) + Number($("#jsfzr_num_difference").val()) + Number($("#scjl_num_difference").val()) + Number($("#aqzg_num_difference").val()) + Number($("#aqy_num_difference").val()) + Number($("#zlzg_num_difference").val()) + Number($("#zjy_num_difference").val()) + Number($("#yjsgy_num_difference").val()) + Number($("#erjsgy_num_difference").val()) + Number($("#sjsgy_num_difference").val()) + Number($("#zly_num_difference").val()) + Number($("#dg_num_difference").val()) + Number($("#clzg_num_difference").val()) + Number($("#cly_num_difference").val()) + Number($("#lzy_num_difference").val())
        $("#difference_sum").val(difference_sum);
        actual_sum = Number($("#xmjlNum").val()) + Number($("#jsfzrNum").val()) + Number($("#scjlNum").val()) + Number($("#aqzgNum").val()) + Number($("#aqyNum").val()) + Number($("#zlzgNum").val()) + Number($("#zjyNum").val()) + Number($("#yjsgyNum").val()) + Number($("#erjsgyNum").val()) + Number($("#sjsgyNum").val()) + Number($("#zlyNum").val()) + Number($("#dgNum").val()) + Number($("#clzgNum").val()) + Number($("#clyNum").val()) + Number($("#lzyNum").val())
        $("#totalNum").val(actual_sum);
    }

    function submitHandler() {
        if ($.validate.form()) {
            $("#totalArea,#totalNum").removeAttr('disabled');
            var data = $("#proProgress-add").serializeArray();
            $.operate.save(prefix + "/edit", data);
        }
    }
</script>
</body>
</html>